Skip to content

fix(kernel): repair diagnostic RAW builds and CFI calls - #371

Merged
okhsunrog merged 4 commits into
mainfrom
fix/ci-main
Nov 4, 2026
Merged

okhsunrog merged 4 commits into
mainfrom
fix/ci-main

Conversation

@okhsunrog

@okhsunrog okhsunrog commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

CI stopped before kernel runtime qualification: root test fixtures did not model Android /data ownership, and the musl fixture oracle did not select an available C compiler. Once those stages ran, six kmod-QEMU builds and all builtin builds failed on compiler-rt outline atomic helpers; older GKI kernels also panicked when the diagnostic RAW control called kallsyms-resolved helpers through jump-table CFI.

  • Preserve the original /data test ownership/effective-group fix and NDK clang/llvm-ar selection.
  • Compile kernel diagnostic atomics inline for the .ko and builtin backends.
  • Put only the dynamically resolved PID/clock calls behind non-inlined __nocfi boundaries, following the existing module pattern; retain the other CFI checks and RAW authorization/expiry rules.
  • Print the complete bounded serial log on QEMU panic/timeout so the existing CI job log retains the failure evidence.

The diagnostic run confirmed the failure at ktime_get_with_offset from vpnhide_diag_raw_show on all four 5.10/5.15 kmod variants. It also verified all three builtin variants after the atomic fix: diagnostic CI.

Testing: pinned clang-format 18 check, rustfmt check, independent diagnostic scope C test, and all 11 builtin integration tests passed locally. The final CI passed on 3f97820, including all seven kmod-QEMU variants (full, RAW and protected fixtures), all three builtin-QEMU variants, Rust, Android and the required ci-ok gate. Each builtin rebuild restored its cache and had 99.82% compiler-cache hits (only five misses). These are isolated Linux/kernel checks; no Android device acceptance is claimed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T11:20:51.532298Z 064445c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added area:ci CI workflows, images and scripts area:core labels Nov 4, 2026
@okhsunrog

Copy link
Copy Markdown
Owner Author

Correction: the CI rust job runs the tests as root inside the job container. There install() pins owner uid 0, so the platform data parent has to be system:system (1000:1000), but the tempdir was root:root. The code correctly refused the group-writable 0771 dir. The test now chowns data to 1000:1000 when euid == 0, matching AOSP. The data/adb 0771 case still has to fail. The egid change from the first commit fixes the same test for unprivileged runs where uid ≠ gid. Verified locally as root and as uid 4001/gid 4118.

@github-actions github-actions Bot added area:kmod Kernel module (.ko) backend area:builtin Built-in kernel backend and integrator labels Nov 4, 2026
@github-actions github-actions Bot added the area:docs Documentation only label Nov 4, 2026
@okhsunrog okhsunrog changed the title fix(ci): make rust and qemu-native-probes green fix(kernel): repair diagnostic RAW builds and CFI calls Nov 4, 2026
@okhsunrog
okhsunrog merged commit b0999b7 into main Nov 4, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builtin Built-in kernel backend and integrator area:ci CI workflows, images and scripts area:core area:docs Documentation only area:kmod Kernel module (.ko) backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant